
import { handleShopServiceType } from "@/common/service";

import { IResponseSuccess, IShopServiceType, IShopServiceTypeData } from "@/typing";
import { makeAutoObservable } from "mobx";

class ServiceStore {
  serviceTypeList: IShopServiceTypeData[] = [];

  constructor() {

    makeAutoObservable(this)
  }
  async handleInitServiceTypeList() {
    const list = await handleShopServiceType() as IResponseSuccess<IShopServiceType>
    //    const {data:{data}} = list.data.data;
    if (list.data.data && list.data.data.length > 0) {
      this.serviceTypeList = list.data.data
    }
  }
}
export default ServiceStore;